define(["app","js/approve/approveView","js/init", "text!app/content/toolbar.html"], 
	function(app, approveView,base,toolbar) {
	
	
	var bindings = [		
		//导航链接
		{
			element: '.approve-page .toolbar-link',
			event: 'click',
			handler: clickRoute
		}		
	];

	function init(query){	
		
		var _toolbar = $(' .approve-page .toolbar-bottom')
			if(_toolbar.length<=0){
				$(' .approve-page').append(toolbar);
			}
		approveView.render({			
			bindings: bindings
		});
	}
	
	//底部导航点击事件
	function clickRoute(e){
		if(!app.mainView){
			app = app.getApp();
		}
		
		var page = $(e.currentTarget).attr('pid')
		app.mainView.router.loadPage('app/'+page+'.html');
	}
	

	return {
		init: init
	};
});